#ifndef PROGRAM_H
#define PROGRAM_H
#include "include\glew.h"

#define MAXPROGRAM 10

class Program
{
public:
	Program();
	~Program();
	bool MakeProgram(char* vertexsh, char* geometrysh=0, char* fragmentsh=0);
	void BeginProgram(); //glUseProgram(prog)
	void EndProgram();
	void BindTexture(GLenum unit,GLenum, GLuint,char*nameinshader);

    void setUniform1f(char*,float);

private:
	GLuint prog;
	void _loadshader(char* shadername,char* buffer);
	void _printlog(GLuint obj);

	//handle
	char* buffer;
	int len;


};



#endif